<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加管理员</title>
    <link rel="stylesheet" href="../../static/plugins/layui/css/layui.css" media="all" th:href="@{/plugins/layui/css/layui.css}"/>
    <link rel="stylesheet" href="../../static/plugins/font-awesome/css/font-awesome.min.css" th:href="@{/plugins/font-awesome/css/font-awesome.min.css}">

    <link rel="stylesheet" type="text/css" href="../../static/simditor/styles/simditor.css" th:href="@{/simditor/styles/simditor.css}"/>

    <script type="text/javascript" src="../../static/simditor/scripts/jquery.min.js" th:src="@{/simditor/scripts/jquery.min.js}"></script>
    <script type="text/javascript" src="../../static/simditor/scripts/module.js" th:src="@{/simditor/scripts/module.js}"></script>
    <script type="text/javascript" src="../../static/simditor/scripts/hotkeys.js" th:src="@{/simditor/scripts/hotkeys.js}"></script>
    <script type="text/javascript" src="../../static/simditor/scripts/uploader.js" th:src="@{/simditor/scripts/uploader.js}"></script>
    <script type="text/javascript" src="../../static/simditor/scripts/simditor.js" th:src="@{/simditor/scripts/simditor.js}"></script>


</head>
<body>
<blockquote class="layui-elem-quote">
    <a onclick="window.location.reload();" style='cursor:pointer;display: inline-block'>
        <img src="../../static/images/refresh.png" height="20" th:src="@{/images/refresh.png}"/>
    </a>&nbsp;
    <a onclick="history.go(-1);" style="color:#009688; cursor:pointer;display: inline-block;margin:5px">管理员管理</a>><span style="display: inline-block;margin:5px">添加管理员</span>
</blockquote>
<div style="margin-left: 15px;">



    <!--/*@thymesVar id="entity" type="com.example.demo.admin.bean.AdminBean"*/-->
    <form class="layui-form" action="" th:action="@{/Admin/admin/save}" method="post" th:object="${entity}">



        <input th:field="*{id}" th:if="*{id!=0}" type="hidden">


        <div class="layui-form-item margin-left">
            <div class="layui-inline">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-block">
                    <input type="text" name="title" autocomplete="off" placeholder="请输入用户名" class="layui-input" th:field="*{username}" lay-verify="required">
                </div>
            </div>
        </div>


        <div class="layui-form-item margin-left">
         <div class="layui-inline">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="title" autocomplete="off" placeholder="请输入密码" class="layui-input" th:field="*{password}" lay-verify="required">
            </div>
         </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio"  value="0" title="启用" th:field="*{state}">
                <input type="radio"  value="1" title="禁用" th:field="*{state}">
            </div>
        </div>


        <div class="layui-form-item margin-left" >
                <label class="layui-form-label">关联角色</label>
            <!--/*@thymesVar id="rolebean" type="com.example.demo.security.bean.SecurityRoleBean"*/-->
            <div class="layui-input-block">
             <input type="checkbox" th:name="roleBeanSet" th:title="*{nickName}"  th:value="*{id}"  th:checked="*{__${selectrole}==null?false:${#lists.contains(selectrole,#strings.toString(rolebean.id))}__}"   lay-skin="primary"  th:each="rolebean:${roles}" th:object="${rolebean}"/>
            </div>
        </div>



        <div class="layui-form-item margin-left">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="submit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="../../static/plugins/layui/layui.js" th:src="@{/plugins/layui/layui.js}"></script>
<script th:inline="javascript">

    layui.use('form', function(){
        var form = layui.form();
        var $ = layui.jquery;
    });

</script>
</body>
</html>